package com.company.genealogy.web.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 配偶信息表
 */
@Data
@TableName("tb_spouse")
public class Spouse {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String gender;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthDate;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date deathDate;
    private String avatar;
    private String photo;
    private String story;
    private String contact;
    private String nativePlace;
    private String nativeProvinceCode;
    private String nativeCityCode;
    private String nativeCountyCode;
    private String nativeTownCode;
    private String currentAddress;
    private Integer status;
    private Date createdAt;
    private Date updatedAt;
    
    // 扩展字段（非表字段，仅用于展示）
    @TableField(exist = false)
    private String nativeProvinceName;
    @TableField(exist = false)
    private String nativeCityName;
    @TableField(exist = false)
    private String nativeCountyName;
    @TableField(exist = false)
    private String nativeTownName;
} 